package com.yh.doing.command_pattern.demo;

/**
 * @program: design-patterns
 * @description:
 * @author: yangh0597@163.com
 * @date: 2022-11-27 20:27
 * @problem:
 **/
public class Invoker {
    private ICommand iCommand;

    public Invoker(ICommand iCommand) {
        this.iCommand = iCommand;
    }

    public  void  action(){
        this.iCommand.execute();
    }
}
